package com.yanqu.road.server.cmd.giftKey;

import com.yanqu.road.server.cmd.base.AbstractCommand;
import com.yanqu.road.server.cmd.giftKey.task.ExchangeGiftKeyTask;
import com.yanqu.road.server.command.Cmd;
import com.yanqu.road.server.gameplayer.GamePlayer;
import com.yanqu.road.server.manger.giftKey.GiftKeyMgr;
import com.yanqu.road.message.YanQuMessage;
import com.yanqu.road.server.protocol.Protocol;

@Cmd(code = Protocol.S_USE_GIFT_KEY, desc = "使用兑换码")
public class UseGiftKeyCmd extends AbstractCommand {

    @Override
    public boolean parseData(YanQuMessage packet) throws Exception {
        return true;
    }

    @Override
    public void execute(GamePlayer player, YanQuMessage packet) throws Exception {
        GiftKeyMgr.addTask(new ExchangeGiftKeyTask(packet, player));
    }

    @Override
    public void sendData(GamePlayer player) {

    }

}
